﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mgfiles.aspx.cs" Inherits="Mocola.Net.Web.mgfiles" %>
<%@ Register Assembly="obout_Flyout2_NET" Namespace="OboutInc.Flyout2" TagPrefix="cc1" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>CsLand Ams v1.0 - 中新置地档案管理系统</title>
    <meta name="description" content="CsLand Ams v1.0 - 中新置地档案管理系统" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <link rel="stylesheet" href="css/content.css" type="text/css" />
    <link rel="stylesheet" href="css/ui.css" type="text/css" />
    <link rel="stylesheet" href="css/sys.css" type="text/css" />
    <link rel="stylesheet" href="css/table.css" type="text/css" />
    <link rel="stylesheet" href="plugins/tab1/tab1.css" type="text/css" />
    <!--[if IE]>
	    <script type="text/javascript" src="scripts/excanvas-compressed.js"></script>	
        <style type="text/css"> html{ height: 100%; overflow: auto; } </style>	
    <![endif]-->

    <script type="text/javascript" src="scripts/mootools-1.2-core.js"></script>
    <script type="text/javascript" src="scripts/mootools-1.2-more.js"></script>
    <script type="text/javascript" src="scripts/mocha.js"></script>
    <script type="text/javascript" src="scripts/mocola-funs.js"></script>

    <!--Begin:[#23]-->
    <style type="text/css">
        .SelectedNode
        {
            background-color: Red;
            padding: 5px;
            color: White;
            font-weight: bold;
        }
    </style>

    <script type="text/javascript">
        function ChkAll(obj,tagID)
        {		
           var arr=$(tagID).getElementsByTagName("input");
           {
                for(var i=0;i<arr.length;i++)
                {
                    arr[i].checked=obj.checked;
                }
           }
        }       
        function chkData()
        {
            var count=0;
            var arr=$("DivMaps").getElementsByTagName("input");
            {
                for(var i=0;i<arr.length;i++)
                {
                    if(arr[i].checked) count++;
                }
            }
            arr=$("DivFiles").getElementsByTagName("input");
            {
                for(var i=0;i<arr.length;i++)
                {
                    if(arr[i].checked) count++;
                }
            }
            arr=$("DivOutFiles").getElementsByTagName("input");
            {
                for(var i=0;i<arr.length;i++)
                {
                    if(arr[i].checked) count++;
                }
            }
            if(count==0)
            {
                alert("请选择文件、图纸或外来文件！");
                return false;
            }
            var v=$('<%=txtPassword.ClientID %>').value;
            if(v=="")
            {
                alert("请输入密码！");
                return false;
            }
        }
        
    function getNode(evt)
    {
         evt1 = window.event ? window.event.srcElement : evt.target;
         if(evt1.tagName && evt1.tagName != "INPUT")
         {
            if(evt1.tagName == "IMG")
            {       
               return true;
            }
            else
            {
            return false;
            }
          }
     }
     function UseReg(projectID,fenLei,leiBie)
     {
         new window.parent.MochaUI.Window({
                id: 'usereg',
                title: '利用登记',
                loadMethod: 'iframe',
                contentURL: 'UseReg.aspx?pid='+projectID+'&fid='+fenLei+'&lid='+leiBie,
                width: 530,
                height: 400,
                resizable:false
            });
     }
    </script>
    <!--End:[#23]-->
    <script type="text/javascript"> 
    <!--
    /*TAB显示样式*/
    function setTab(name, cursel, n) {
    for (i = 1; i <= n; i++) {
    var menu = document.getElementById(name + i);
    var con = document.getElementById("con_" + name + "_" + i);
    menu.className = i == cursel ? "hover" : "";
    con.style.display = i == cursel ? "block" : "none";
    }
    } 
    //--> 
    </script> 
</head>
<body style="padding: 5px;">
    <form id="form1" runat="server">
    <% if (RoleId == 1) {%>
    <!-- 管理员 -->
    <div class="dvspecalt">
        <div style="padding: 5px;">
            <input id="btnNew" type="button" value="新增" class="btnzc" style="width: 100px" onclick="$('flNew').style.display='block'" />
            <!-- BEGIN: [#8] -->
            <input id="ExportPic" type="button" value="导出图纸" class="btnzc" style="width: 100px"
                onclick="f_export('3');" />
            <input id="ExportFile" type="button" value="导出文件" class="btnzc" style="width: 100px"
                onclick="f_export('4');" />
            <input id="Button4" type="button" value="导出外来文件" class="btnzc" style="width: 100px"
                onclick="f_export('2');" />
            <!--Begin:[#23]-->
            <input id="btnFolder" type="button" value="移动到..." class="btnzc" style="width: 100px" />
            <cc1:Flyout ID="Flyout1" runat="server" AttachTo="btnFolder" Position="BOTTOM_LEFT">
                <div style="border: 1px solid #777777; background-color: #ffffff; text-align: left;
                    width: 300px; height: 250px; font-size: 12px; padding: 8px;">
                    移动到目录<asp:HiddenField ID="HFNodeValue" runat="server" />
                    <div style="background-color: #F5F5F5; border: 1px solid #91A0CB; margin-bottom: 5px;
                        padding: 10px; height: 180px; overflow: auto;" id="divTreeContainer">
                        <asp:TreeView ID="tvFolder" runat="server"  ShowLines="True" SelectedNodeStyle-CssClass="SelectedNode">
                        </asp:TreeView>
                    </div>
                    <div style="margin:10px;">
                        <asp:Label ID="lbPwd" runat="server" Text="密码" Font-Size="15px" Style="padding-bottom: 3px;"></asp:Label>
                        <asp:TextBox ID="txtPassword" TextMode="Password" Cssclass="inputbox" runat="server"></asp:TextBox>
                        <asp:Button ID="btnMove" runat="server" Text="移动" OnClientClick="return chkData();" CssClass="btnzc" OnClick="btnMove_Click" />
                    </div>
                </div>
            </cc1:Flyout>
            <!--End:[#23]-->
            <!-- End: [#8] -->
            <fieldset id="flNew" style="display: none">
                <legend>选择新增类型：</legend>
                <div style="clear: both; padding: 5px;">
                    <input id="Button1" type="button" value="图纸类" class="btnzc" style="width: 100px"
                        onclick="gotourl(0);" />
                    <input id="Button2" type="button" value="文件类" class="btnzc" style="width: 100px"
                        onclick="gotourl(1);" />
                    <input id="Button3" type="button" value="外来文件类" class="btnzc" style="width: 120px"
                        onclick="gotourl(2);" />
                </div>
            </fieldset>
        </div>
    </div>
    <% } %>
    <!--Begin:[#23]-->
    <div style="margin-top:5px;">
        <div id="Tab2"> 
            <div class="Menubox"> 
                <ul> 
                <li id="two1" onclick="setTab('two',1,3)" class="hover">图纸类</li> 
                <li id="two2" onclick="setTab('two',2,3)" >文件类</li> 
                <li id="two3" onclick="setTab('two',3,3)" >外来文件类</li> 
                </ul> 
            </div> 
            <div class="Contentbox"> 
                <div id="con_two_1" >
                    <div style="padding: 10px;">
                    <div>
                        <table id="tbMaps" class="table2" cellspacing="0" style="margin-top: 5px; border: 1px #C1DAD7 solid;">
                            <tr>
                                <th rowspan="2" style="width: 20px">
                                    <asp:CheckBox ID="chkMap_All" runat="server" onclick="ChkAll(this,'tbMaps')" />
                                </th>
                                <th rowspan="2" style="width: 160px">
                                    名称
                                </th>
                                <th colspan="2" style="width: 155px">
                                    编号
                                </th>
                                <th rowspan="2" style="width: 70px">
                                    专业类别
                                </th>
                                <th rowspan="2" style="width: 70px">
                                    出图日期
                                </th>
                                <th rowspan="2" style="width: 140px">
                                    设计单位
                                </th>
                                <th rowspan="2" style="width: 35px">
                                    版本
                                </th>
                                <th rowspan="2" style="width: 35px">
                                    图幅
                                </th>
                                <th rowspan="2" style="width: 100px">
                                    张/套
                                </th>
                                <th rowspan="2" style="width: 35px">
                                    数量
                                </th>
                                <th colspan="2" style="width: 90px">
                                    载体/材质
                                </th>
                                <th rowspan="2" style="width: 35px">
                                    密级
                                </th>
                                <th rowspan="2" style="width: 70px">
                                    保管期限
                                </th>
                                <th rowspan="2" style="width: 35px">
                                    状态
                                </th>
                                <th rowspan="2" style="width: 80px">
                                    发起部门
                                </th>
                                <th rowspan="2" style="width: 55px">
                                    移交人
                                </th>
                                <th rowspan="2" style="width: 55px">
                                    接受人
                                </th>
                                <th rowspan="2" style="width: 70px">
                                    接受日期
                                </th>
                                <th rowspan="2">
                                    备注
                                </th>
                                <th rowspan="2" style="width: 280px">
                                    操作
                                </th>
                            </tr>
                            <tr>
                                <th style="width: 55px">
                                    决定号
                                </th>
                                <th>
                                    图纸编号
                                </th>
                                <th style="width: 45px">
                                    载体
                                </th>
                                <th style="width: 45px">
                                    材质
                                </th>
                            </tr>
                            <asp:Repeater ID="rptMaps" runat="server" OnItemDataBound="rptMaps_ItemDataBound">
                                <ItemTemplate>
                                    <tr>
                                        <td align="center">
                                            <asp:CheckBox ID="chkMapItem" runat="server" />
                                            <asp:HiddenField ID="hfMapsID" runat="server" />
                                        </td>
                                        <td>
                                            <%# Eval("Name") %>
                                        </td>
                                        <td>
                                            <%# Eval("JueDingHao")%>
                                        </td>
                                        <td>
                                            <%# Eval("TuZhiBianHao")%>
                                        </td>
                                        <td>
                                            <%# Eval("ZhuanYeLeiBie")%>
                                        </td>
                                        <td>
                                            <%# Eval("ChuTuRiQi")%>
                                        </td>
                                        <td>
                                            <%# Eval("SheJiDanWei")%>
                                        </td>
                                        <td>
                                            <%# Eval("BanBen")%>
                                        </td>
                                        <td>
                                            <asp:Literal ID="lblTuFu" runat="server" Text='<%# Eval("TuFu")%>'></asp:Literal>
                                        </td>
                                        <td>
                                            <!--BEGIN：[#12]-->
                                            <%# Eval("Zhang")%>张/套,共<%# Eval("Tao")%>套
                                            <!--END：[#12]-->
                                        </td>
                                        <td>
                                            <%# Eval("ShuLiang")%>
                                        </td>
                                        <td>
                                            <asp:Literal ID="lblZaiTi" runat="server" Text='<%# Eval("ZaiTi")%>'></asp:Literal>
                                        </td>
                                        <td>
                                            <asp:Literal ID="lblCaiZhi" runat="server" Text='<%# Eval("CaiZhi")%>'></asp:Literal>
                                        </td>
                                        <td>
                                            <asp:Literal ID="lblMiJi" runat="server" Text='<%# Eval("MiJi")%>'></asp:Literal>
                                        </td>
                                        <td>
                                            <asp:Literal ID="lblBaoGuanQiXian" runat="server" Text='<%# Eval("BaoGuanQiXian")%>'></asp:Literal>
                                        </td>
                                        <td>
                                            <asp:Literal ID="lblZhuangTai" runat="server" Text='<%# Eval("ZhuangTai")%>'></asp:Literal>
                                        </td>
                                        <td>
                                            <%# Eval("FaQiBuMen")%>
                                        </td>
                                        <td>
                                            <%# Eval("YiJiaoRen")%>
                                        </td>
                                        <td>
                                            <%# Eval("JiShouRen")%>
                                        </td>
                                        <td>
                                            <%# Eval("JiShouRiQi")%>
                                        </td>
                                        <td>
                                            <%# Eval("BeiZhu")%>
                                        </td>
                                        <td align="center">
                                            <% if (RoleId == 1) {%>
                                            <!-- 管理员 -->
                                            <input type="button" class="btnzc" value="编辑" onclick="editMap(<%# Eval("ID") %>)" />
                                            <input type="button" class="btnzc" value="删除" onclick="delMap('M',<%# Eval("ID") %>)" />
                                            <input type="button" class="btnzc" value="办文" onclick="" />
                                            <input type="button" class="btnzc" value="销毁" onclick="" />
                                            <input type="button" class="btnzc" value="利用登记" onclick="UseReg(<%# Eval("ID") %>,'M','P')" />
                                           
                                            <%} else if (RoleId == 2) {%>
                                            <!-- 普通用户 -->
                                            <input type="button" class="btnzc" value="借阅/领用" onclick="funJieYue('M',<%# Eval("ID") %>,'<%# Eval("Name") %>')" />
                                            <%} %>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                    </div>
                    <!-- BEGIN: [#5] -->
                    <div style="margin-top: 10px;">
                        <webdiyer:AspNetPager ID="ppMaps" runat="server" HorizontalAlign="Left" PageSize="6"
                            AlwaysShow="true" ShowInputBox="Always" ShowCustomInfoSection="Right" CustomInfoSectionWidth="300px"
                            InputBoxStyle="border:1px solid #c8c8c8;" SubmitButtonStyle="border:none;backgroundColor:#F5F5DC;height:19px;"
                            BorderColor="#F5F5DC" OnPageChanged="ppMaps_PageChanged" FirstPageText="首页" LastPageText="末页" NextPageText="下页" PrevPageText="上页">
                        </webdiyer:AspNetPager>
                    </div>
                    <!-- END: [#5] -->
                </div>
                </div> 
                <div id="con_two_2" style="display:none">
                    <div style="padding: 10px;">
                    <div>
                        <table id="tbFiles" class="table2" cellspacing="0" style="margin-top: 5px; border: 1px #C1DAD7 solid;">
                            <tr>
                                <th rowspan="2" style="width: 20px">
                                    <asp:CheckBox ID="chkFile_All" runat="server" onclick="ChkAll(this,'tbFiles')" />
                                </th>
                                <th rowspan="2" style="width: 160px">
                                    名称
                                </th>
                                <th colspan="3" style="width: 210px">
                                    编号
                                </th>
                                <th rowspan="2" style="width: 75px">
                                    发文日期
                                </th>
                                <th rowspan="2" style="width: 120px">
                                    发文单位
                                </th>
                                <th rowspan="2" style="width: 35px">
                                    数量
                                </th>
                                <th colspan="2" style="width: 90px">
                                    载体/材质
                                </th>
                                <th rowspan="2" style="width: 35px">
                                    密级
                                </th>
                                <th rowspan="2" style="width: 75px">
                                    保管期限
                                </th>
                                <th rowspan="2" style="width: 35px">
                                    状态
                                </th>
                                <th rowspan="2" style="width: 80px">
                                    发起部门
                                </th>
                                <th rowspan="2" style="width: 60px">
                                    移交人
                                </th>
                                <th rowspan="2" style="width: 60px">
                                    接受人
                                </th>
                                <th rowspan="2" style="width: 75px">
                                    接受日期
                                </th>
                                <th rowspan="2">
                                    备注
                                </th>
                                <th rowspan="2" style="width: 280px">
                                    操作
                                </th>
                            </tr>
                            <tr>
                                <th style="width: 70px">
                                    文件号
                                </th>
                                <th style="width: 70px">
                                    申请号
                                </th>
                                <th style="width: 70px">
                                    决定号
                                </th>
                                <th style="width: 45px">
                                    载体
                                </th>
                                <th style="width: 45px">
                                    材质
                                </th>
                            </tr>
                            <asp:Repeater ID="rptFiles" runat="server" OnItemDataBound="rptFiles_ItemDataBound">
                                <ItemTemplate>
                                    <tr>
                                        <td align="center">
                                            <asp:CheckBox ID="chkFileItem" runat="server" />
                                            <asp:HiddenField ID="hfFileID" runat="server" />
                                        </td>
                                        <td>
                                            <%# Eval("Name") %>
                                        </td>
                                        <td>
                                            <%# Eval("WenJianHao") %>
                                        </td>
                                        <td>
                                            <%# Eval("ShenQingHao") %>
                                        </td>
                                        <td>
                                            <%# Eval("JueDingHao") %>
                                        </td>
                                        <td>
                                            <%# Eval("FaWenRiQi")%>
                                        </td>
                                        <td>
                                            <%# Eval("FaWenDanWei")%>
                                        </td>
                                        <td>
                                            <%# Eval("ShuLiang")%>
                                        </td>
                                        <td>
                                            <asp:Literal ID="lblZaiTi" runat="server" Text='<%# Eval("ZaiTi")%>'></asp:Literal>
                                        </td>
                                        <td>
                                            <asp:Literal ID="lblCaiZhi" runat="server" Text='<%# Eval("CaiZhi")%>'></asp:Literal>
                                        </td>
                                        <td>
                                            <asp:Literal ID="lblMiJi" runat="server" Text='<%# Eval("MiJi")%>'></asp:Literal>
                                        </td>
                                        <td>
                                            <asp:Literal ID="lblBaoGuanQiXian" runat="server" Text='<%# Eval("BaoGuanQiXian")%>'></asp:Literal>
                                        </td>
                                        <td>
                                            <asp:Literal ID="lblZhuangTai" runat="server" Text='<%# Eval("ZhuangTai")%>'></asp:Literal>
                                        </td>
                                        <td>
                                            <%# Eval("FaQiBuMen")%>
                                        </td>
                                        <td>
                                            <%# Eval("YiJiaoRen")%>
                                        </td>
                                        <td>
                                            <%# Eval("JieShouRen")%>
                                        </td>
                                        <td>
                                            <%# Eval("JieShouRiQi")%>
                                        </td>
                                        <td>
                                            <%# Eval("BeiZhu")%>
                                        </td>
                                        <td align="center">
                                            <% if (RoleId == 1) {%>
                                            <!-- 管理员 -->
                                            <input type="button" class="btnzc" value="编辑" onclick="editFile(<%# Eval("ID") %>)"/>
                                            <input type="button" class="btnzc" value="删除" onclick="delMap('F',<%# Eval("ID") %>)"/>
                                            <input type="button" class="btnzc" value="办文" onclick="" />
                                            <input type="button" class="btnzc" value="销毁" onclick="" />
                                            <input type="button" class="btnzc" value="利用登记" onclick="UseReg(<%# Eval("ID") %>,'F','P')" />
                                            <%} else if (RoleId == 2) {%>
                                            <!-- 普通用户 -->
                                            <input type="button" class="btnzc" value="借阅/领用" onclick="funJieYue('F',<%# Eval("ID") %>,'<%# Eval("Name") %>')" />
                                            <%} %>                                    
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                    </div>
                    <!-- BEGIN: [#5] -->
                    <div style="margin-top: 10px;">
                        <webdiyer:AspNetPager ID="ppFile" runat="server" HorizontalAlign="Left" PageSize="6"
                            AlwaysShow="true" ShowInputBox="Always" ShowCustomInfoSection="Right" CustomInfoSectionWidth="300px"
                            InputBoxStyle="border:1px solid #c8c8c8;" SubmitButtonStyle="border:none;backgroundColor:#F5F5DC;height:19px;"
                            BorderColor="#F5F5DC" OnPageChanged="ppFile_PageChanged" FirstPageText="首页" LastPageText="末页" NextPageText="下页" PrevPageText="上页">
                        </webdiyer:AspNetPager>
                    </div>
                    <!-- END: [#5] -->
                </div>
                </div> 
                <div id="con_two_3" style="display:none">
                    <div style="padding: 10px;">
                    <div>
                        <table id="tbOutFiles" class="table2" cellspacing="0" style="margin-top: 5px; border: 1px #C1DAD7 solid;">
                            <tr>
                            <th style="width: 20px">
                                    <asp:CheckBox ID="chkOutFile_All" runat="server" onclick="ChkAll(this,'tbOutFiles')" />
                                </th>
                                <th style="width: 100px">文件号</th>
                                <th style="width: 160px">文件名称</th>
                                <th style="width: 130px">发文机关</th>
                                <th style="width: 80px">接收日期</th>
                                <th style="width: 80px">发文日期</th>
                                <th style="width: 80px">保存期限</th>
                                <th style="width: 80px">存档号</th>
                                <th style="width: 80px">有效状态</th>
                                <th style="width: 120px">备注</th>
                                <th style="width: 280px">操作</th>
                            </tr>
                            <asp:Repeater ID="rptOutFiles" runat="server" OnItemDataBound="rptOutFiles_ItemDataBound">
                                <ItemTemplate>
                                    <tr>
                                        <td align="center">
                                            <asp:CheckBox ID="chkOutFileItem" runat="server" />
                                            <asp:HiddenField ID="hfOutFileID" runat="server" />
                                        </td>
                                        <td>
                                            <%# Eval("Name") %>
                                        </td>
                                        <td>
                                            <%# Eval("WenJianHao") %>
                                        </td>
                                        <td>
                                            <%# Eval("FaWenJiGuan")%>
                                        </td>
                                        <td>
                                            <%# Eval("FaWenRiQi")%>
                                        </td>
                                        <td>
                                            <%# Eval("JieShouRiQi")%>
                                        </td>
                                        <td>
                                            <asp:Literal ID="lblBaoGuanQiXian" runat="server" Text='<%# Eval("BaoCunQiXian")%>'></asp:Literal>
                                        </td>
                                        <td>
                                            <%# Eval("CunDangHao")%>
                                        </td>
                                        <td>
                                            <asp:Literal ID="lblZhuangTai" runat="server" Text='<%# Eval("ZhuangTai")%>'></asp:Literal>
                                        </td>
                                        <td>
                                            <%# Eval("BeiZhu")%>
                                        </td>
                                        <td align="center">
                                            <% if (RoleId == 1) {%>
                                            <!-- 管理员 -->
                                            <input type="button" class="btnzc" value="编辑" onclick="editOutFile(<%# Eval("ID") %>)"/>
                                            <input type="button" class="btnzc" value="删除" onclick="delMap('O',<%# Eval("ID") %>)"/>
                                            <%--<input type="button" class="btnzc" value="办文" onclick="" />
                                            <input type="button" class="btnzc" value="销毁" onclick="" />
                                            <input type="button" class="btnzc" value="利用登记" onclick="UseReg(<%# Eval("ID") %>,'F','P')" />--%>
                                            <%} else if (RoleId == 2) {%>
                                            <!-- 普通用户 -->
                                            <input type="button" class="btnzc" value="借阅/领用" onclick="funJieYue('F',<%# Eval("ID") %>,'<%# Eval("Name") %>')" />
                                            <%} %>                                    
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                    </div>
                    <div style="margin-top: 10px;">
                        <webdiyer:AspNetPager ID="ppOutFile" runat="server" HorizontalAlign="Left" PageSize="6"
                            AlwaysShow="true" ShowInputBox="Always" ShowCustomInfoSection="Right" CustomInfoSectionWidth="300px"
                            InputBoxStyle="border:1px solid #c8c8c8;" SubmitButtonStyle="border:none;backgroundColor:#F5F5DC;height:19px;"
                            BorderColor="#F5F5DC" OnPageChanged="ppOutFile_PageChanged" FirstPageText="首页" LastPageText="末页" NextPageText="下页" PrevPageText="上页">
                        </webdiyer:AspNetPager>
                    </div>
                </div>
                </div>
            </div> 
        </div> 
    </div>    
    <!--End:[#23]-->
    </form>

    <script type="text/javascript">
        var tid = gup('tid');
        var eid = gup('eid');
                  
        <% if (RoleId == 1) {%>
            // 管理员
            function gotourl(p){
                if(p==0) {
                    location.replace('newmap.aspx?lb=M&tid='+tid+'&eid='+eid);
                } else if(p==1) {
                    location.replace('newfile.aspx?lb=M&tid='+tid+'&eid='+eid);
                } else if(p==2) {
                    location.replace('newoutfile.aspx?tid='+tid+'&eid='+eid);
                }
            } 
            function f_export(p)
            {
                var url="ajax/Export_Excel.aspx?tid="+tid+"&eid="+eid+"&p="+p;
                location.replace(url);
            }
            function editMap(id) {
                location.replace('newmap.aspx?lb=M&tid='+tid+'&eid='+eid+'&id='+id);
            }

            function editFile(id) {
                location.replace('newfile.aspx?lb=M&tid='+tid+'&eid='+eid+'&id='+id);
            }
            
            function delMap(zl,id) {
                new window.parent.MochaUI.Window({
				    id: 'delFileMap',
				    title: '删除图纸/文件',
				    loadMethod: 'iframe',
				    contentURL: 'ajax/ShowPwd.aspx?zl='+zl+'&id='+id+'&lb=M&tid='+tid+'&eid='+eid,
				    width: 300,
				    height: 200,
				    maximizable: false,
				    resizable:false
			    });
            }
            
            function editOutFile(id) {
                location.replace('newoutfile.aspx?lb=M&tid='+tid+'&eid='+eid+'&id='+id);
            }
            
        <%} else if (RoleId == 2) {%>
            // 普通用户
            // 借阅领用
            function funJieYue(tp,id,name) {
                new window.parent.MochaUI.Window({
				    id: 'winJyly',
				    title: '借阅 / 领用 申请',
				    loadMethod: 'iframe',
				    contentURL: 'application.aspx?tp='+tp+'&id='+id+'&lb=M',
				    width: 550,
				    height: 350,
				    maximizable: false,
				    resizable:false
			    });
            }
        <%} %>
        
    </script>

</body>
</html>
